package com.me.launcher.adapter;

import com.chad.library.adapter.base.BaseItemDraggableAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.me.launcher.R;
import com.me.launcher.bean.AppBean;

import java.util.List;

/**
 * @author hejiangwei
 */
public class RVAppAdapter extends BaseItemDraggableAdapter<AppBean, BaseViewHolder> {
    public RVAppAdapter(List data) {
        super(R.layout.layout_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AppBean item) {
        helper.setText(R.id.text_name, item.getStrName());
        helper.setImageDrawable(R.id.img_icon,item.getActivityInfo().loadIcon(mContext.getPackageManager()));
    }
}